package com.dst.controller;

import com.dst.eneity.User;
import com.dst.service.impl.UserServiceImpl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class LoginController {
    @RequestMapping("/login")
    public String login(String username,String password){
        UserServiceImpl userService = new UserServiceImpl();
        User login = userService.login(username, password);
        if(login!=null){
            return "/tea/selectAll.do";
        }else
        return "/login.jsp";
    }
}
